<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<html>
<head>
    <title>四川幼儿师范高等专科学校题库系统</title>
    <!--CSS import-->
    <link rel="stylesheet" type="text/css" href="${ctx}/resources/extjs/resources/css/ext-all.css">
    <link rel="stylesheet" type="text/css" href="${ctx}/resources/extjs/ux/fileuploadfield/css/fileuploadfield.css">
	<link rel="stylesheet" type="text/css" href="${ctx}/resources/css/admin/system.css">
	<link rel="shortcut icon" type="image/x-icon" href="${ctx}/resources/image/icon/index/tr.ico" />
    <!--jQuery import-->
    <script type="text/javascript" src="${ctx}/resources/jquery/jquery-3.1.1.js"></script>
    <!--Ext import-->
    <script type="text/javascript" src="${ctx}/resources/extjs/adapter/ext/ext-base.js"></script>
    <script type="text/javascript" src="${ctx}/resources/extjs/ext-all.js"></script>
    <script type="text/javascript" src="${ctx}/resources/extjs/ext-lang-zh_CN.js"></script>
    <!--Ext ux import-->
    <script type="text/javascript" src="${ctx}/resources/extjs/ux/grid/PageSize.js"></script>
    <script type="text/javascript" src="${ctx}/resources/extjs/ux/grid/RowExpander.js"></script>
    <script type="text/javascript" src="${ctx}/resources/extjs/ux/notify/Ext.ux.Notification.js"></script>
    <script type="text/javascript" src="${ctx}/resources/extjs/ux/fileuploadfield/FileUploadField.js"></script>
    <!--System Init-->
    <script type="text/javascript" src="${ctx}/resources/js/init.js"></script>
    <!--JS common import-->
    <script type="text/javascript" src="${ctx}/resources/js/common/JSFunc.js"></script>
    <script type="text/javascript" src="${ctx}/resources/js/common/ExtFunc.js"></script>
    <script type="text/javascript" src="${ctx}/resources/js/common/system.js"></script>
    <!--JS page-->
    <script type="text/javascript" src="${ctx}/resources/js/admin/layout/viewport.js"></script>
    <script type="text/javascript" src="${ctx}/resources/js/admin/layout/header.js"></script>
    <script type="text/javascript" src="${ctx}/resources/js/admin/layout/menu.js"></script>
    <script type="text/javascript" src="${ctx}/resources/js/admin/layout/mainPage.js"></script>
    <!--4 JS Debug-->
    <script>
        Ext.onReady(function(){

	        // TODO 排除
            ctx = $("#ctx").val();

            ajaxRequest({
                url: "initAdminAuthority",
                callback : initBrowser
            });

            function initBrowser(json){
                var coms = json.data;
	            //直接与command相连的module(不重复)，module有嵌套
	            // TODO 排除
                var userModule = $.makeArray(coms.userModule);
	            userCommand = $.makeArray(coms.userCommand);
	            user = coms.user;

	            //包含重复的(多个子module对应个父module,导致父module重复)
                var _showModule = [];
	            // TODO 排除
                $.each(userModule, getShowModule);
                function getShowModule(n, v){
	                while(v!=null){
		                _showModule.push(v);
		                v = v.parent;
	                }
                }
	            // TODO 排除
                showModule = objArrayUnique(_showModule, "id");
                new layout.viewport(showModule);
            }
        });
    </script>
</head>
<input type="hidden" id="ctx" value="${ctx}" />
<body>
</body>
</html>